package com.venue.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.venue.service.PLAService;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;


@Controller
@RequestMapping("/pla")
public class PLAController {

	@Autowired
	private PLAService pLAService;

	@RequestMapping(value = "/headMap")
	@ResponseBody
	public String getIndex(String room){
		return pLAService.headMapData(room,"");
	}

	@RequestMapping(value = "/fromWhere")
	@ResponseBody
	public String fromWhere(String room){
		return pLAService.fromWhere(room,"");
	}

	@RequestMapping(value = "/sexStatic")
	@ResponseBody
	public String sexStatic(String room){
		return pLAService.sexStatic(room,"");
	}

	@RequestMapping(value = "/appStatic")
	@ResponseBody
	public String appStatic(String room){
		return pLAService.appStatic(room);
	}

	@RequestMapping(value = "/agesStatic")
	@ResponseBody
	public String agesStatic(String room){
		return pLAService.agesStatic(room,"");
	}

	@RequestMapping(value = "/personNumHisStatic")
	@ResponseBody
	public String personNumHisStatic(String room, String startTime,String endTime) throws ParseException {
		return pLAService.personNumHisStatic(room, startTime, endTime);
	}

	@RequestMapping(value = "/personNumWarn")
	@ResponseBody
	public String personNumWarn(String room){
		return pLAService.personNumWarn(room);
	}
}
